package com.chen.recruit.domain;

import com.chen.recruit.common.valid.AddGroup;
import com.chen.recruit.common.valid.UpdateGroup;
import com.chen.recruit.domain.model.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;

/**
 * 岗位分类对象 t_post_classify
 *
 * @author cgy
 * @date 2022-08-20
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel("PostClassify 岗位分类对象")
public class PostClassify extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 岗位分类id
     */
    @ApiModelProperty("岗位分类id")
    @Null(message = "新增岗位分类id不能为空", groups = AddGroup.class)
    @NotNull(message = "更新岗位分类id不能为空", groups = UpdateGroup.class)
    private Integer id;

    /**
     * 父岗位分类id
     */
    @ApiModelProperty("父岗位分类id")
    @NotNull(message = "父岗位分类id不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private Integer parentId;

    /**
     * 岗位分类名称
     */
    @ApiModelProperty("岗位分类名称")
    @NotBlank(message = "岗位分类名称不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private String name;

    /**
     * 层级深度
     */
    @ApiModelProperty("层级深度")
    private Integer levelDepth;

}
